import cgi
import datetime
import urllib
import webapp2

import jinja2
import os

import json

dir = os.path.dirname(__file__)
filename = os.path.join(dir, '../view')
jinja_environment = jinja2.Environment(loader=jinja2.FileSystemLoader(filename))

class pruebaemi(webapp2.RequestHandler):

    def get(self):
        template = jinja_environment.get_template('pruebaemi.html')
        self.response.out.write(template.render())

    def post(self):
        fb_uid = int(self.request.get('emi'))
        
        p1 = Person(fb_uid=fb_uid, gender='male', searching='female')
        p1.put()

        self.redirect('/pruebaemi')